<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>8.2. Basic Use Case</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.doc/html/styles.css"/>
	</head>
	<body>
		<h1 id="Basic_REC-RPL_Use_Case">Basic REC-RPL Use Case</h1>
		<h2 id="Creation_of_a_REC">Creation of a REC</h2>
		<p>From a diagram, select a consistent set of elements (here, a Component and the Functions it is performing).</p>
		<p>
			<img height="157" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_61ca87e6.png"/>
		</p>
		<p>From the contextual menu, select &ldquo;REC/RPL-&gt;Create REC-&gt;From selection...&rdquo;</p>
		<p>
			<img height="88" width="575" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_4fd534ab.png"/>
		</p>
		<p>The REC creation dialog appears. A name shall be given to the REC. The Catalog field allows to select in which catalog this REC should be created.
			When working with Libraries, the Catalog is most likely located in a Library. In a library, an additional action &ldquo;With whole library content...&rdquo; is shown in the REC creation menu. If that action is chosen, the new REC will be initialized with the entire contents of the library.</p>
		<p>
			<img height="692" width="590" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m11a06012.png"/>
		</p>
		<p>The scope (content) of the REC is displayed. This dialog helps modifying this scope (for example adding or removing elements). By default, the tool applies a set of business rules to include elements (for example, allocations between Component and Functions, children of an element, Etc.). Note here that despite Functional Exchange &ldquo;fe23&rdquo; is carrying Exchange Items, these Exchange Items are not included by default in the REC. In most of the cases, they shoud not be, as references are kept.</p>
		<p>It is possible at this stage to define which elements will have to be renamed when the REC will be instantiated (label 
			<b>&#91;+SUFFIX&#93;</b>).
		</p>
		<table border="1">
			<tr>
				<td>
					<p>
						<img height="21" width="23" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m2b5f66f0.gif"/>
					</p>
				</td>
				<td>
					<p>Set/Unset the 				Element as having to be renamed at Instantiation</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="20" width="23" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_121da960.gif"/>
					</p>
				</td>
				<td>
					<p>Include 				Selected Element</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="24" width="23" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_78d20a04.gif"/>
					</p>
				</td>
				<td>
					<p>Remove 				Element</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="22" width="23" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_515e8b51.png"/>
					</p>
				</td>
				<td>
					<p>Generic 				Include Elements</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="21" width="21" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m43c6043e.gif"/>
					</p>
				</td>
				<td>
					<p>Include 				Related Elements</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="22" width="24" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m24ae884e.gif"/>
					</p>
				</td>
				<td>
					<p>Include 				Children Elements</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="20" width="20" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_589a1b2e.png"/>
					</p>
				</td>
				<td>
					<p>Include Required 				Dependencies of Selected Element</p>
				</td>
			</tr>
			<tr>
				<td>
					<p>
						<img height="24" width="22" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m594eb14d.gif"/>
					</p>
				</td>
				<td>
					<p>Include All 				Requirement Dependencies</p>
				</td>
			</tr>
		</table>
		<p>
			<br/>
		</p>
		<p>The compliancy field allows defining how REC would be instantiated (is it possible to modify content of the replica? add external interfaces? add ports? add more functions?).
			<br/>
			See the RPL Validation part for further description of any kind of compliancy (This feature is not fully available yet).
		</p>
		<p>
			<br/>
		</p>
		<p>Notice the message at the bottom of the dialog, selected elements are linked to some elements which are not included in the REC (many exchange items, visible by clicking on the browse button on the right). When the REC will be instanciated, elements of the newly RPL will be linked to these exchange items too.</p>
		<p>
			<img height="51" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_56e383b9.png"/>
		</p>
		<p>
			<br/>
		</p>
		<p>Close the dialog and check the result.</p>
		<p>In the Project Explorer, the newly created REC appears. The Semantic Browser also show REC-related information:</p>
		<p>
			<img height="108" width="208" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_707f60f9.png"/>
		</p>
		<p>
			<img height="180" width="626" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m76b1c545.png"/>
		</p>
		<p>And from the Function F2 included in the REC:</p>
		<p>
			<img height="181" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_mf6bfd89.png"/>
		</p>
		<h2 id="Instantiation_of_a_REC">Instantiation of a REC</h2>
		<p>From anywhere in the model, use the contextual command &ldquo;REC/RPL-&gt;Instantiate a RPL from a REC&rdquo;:</p>
		<p>
			<img height="93" width="574" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_17699e08.png"/>
		</p>
		<p>The instantiation dialog opens:</p>
		<p>
			<img height="826" width="685" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_3f98bee7.png"/>
		</p>
		<p>This dialog allows:</p>
		<ul>
			<li>The selection of the REC to instantiate (click on &ldquo;Browse&rdquo;)</li>
			<li>The definition of a target container (Catalog) for the RPL going to 	be created.</li>
			<li>The definition of a suffix for each element of the REC that was marked as having to be renamed.</li>
			<li>The compliancy field allows defining how RPL can be modified 	according to its REC (is it possible to modify content of the 	replica? add external interfaces? add ports? add more functions?) 	See the RPL Validation part for further description of any kind of 	compliancy'
				<i> (This feature is not fully available yet)</i>'
			</li>
			<li>To enable live compliancy validation for this RPL select &ldquo;Enforce RPL Compliance on the fly&rdquo;.</li>
		</ul>
		<p>All RPL elements corresponding to a REC element with the suffix tag &#91;+SUFFIX&#93; will have the RPL suffix.</p>
		<p>The parent locator options exist to specify where the RPL elements will be located:</p>
		<ul>
			<li>Use default locations: Elements will be located in standard containers in the model</li>
			<li>Create specific packages: For each element type, a RPL specific package will be created. Elements of the corresponding type will be stored in that package. Some elements, e.g. Parts do not get a specific package and are located just as if the default locations option would be selected.</li>
			<li>Locate parents manually: A location has to be found manually for the root elements of the RPL. The elements for which a location still has to be found are marked in Orange. The definition of a new location is performed using drag and drop between the two trees:</li>
		</ul>
		<p>
			<img height="381" width="668" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m734c92a5.png"/>
		</p>
		<p>It is possible to create on-the-fly new elements in the right tree, using the contextual menu and rename them by pressing F2. It is possible to double click on a RPL element in the left tree to find its parent in the right tree.</p>
		<p>
			<img height="180" width="500" border="0" src="Images/8.2_Basic_Use_Case.png"/>
		</p>
		<p>Close the dialog.</p>
		<p>The new RPL can be seen in the Project Explorer. The type of the RPL is displayed in brackets:</p>
		<p>
			<img height="70" width="199" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m2d869e08.png"/>
		</p>
		<p>A good practice is to manage REC and RPLs in different folders:</p>
		<p>
			<img height="107" width="215" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m62402328.png"/>
		</p>
		<p>On a diagram, insert the newly created elements (here, the Component and its Functions):</p>
		<p>
			<img height="120" width="203" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_4627cc64.png"/>
		</p>
		<p>The Semantic Browser display RPL- and REC-related information:</p>
		<ul>
			<li>The RPL to which an element belongs (in Referencing Elements)</li>
			<li>The original REC elements it is corresponding to (in Referenced 	Elements)</li>
		</ul>
		<p>
			<img height="323" width="752" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_3464e2e1.png"/>
		</p>
		<p>The Semantic Browser also shows the Functional Exchange &ldquo;fe2&rdquo;, part of the RPL, is also carrying the Exchange Items EI1 and EI2, even though these two Exchange Items were not included in the REC:</p>
		<p>
			<img height="200" width="850" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_5877aab1.png"/>
		</p>
		<p>It is now possible to use this RPL in the model. For example, by connecting it also to other elements:</p>
		<p>
			<img height="139" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_2eecec59.png"/>
		</p>
		<h2 id="Copy-Paste_Layout">Copy-Paste Layout</h2>
		<p>On a diagram showing the source elements of the REC, select all elements and copy the layout:</p>
		<p>
			<img height="199" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m35487b8e.png"/>
		</p>
		<p>This can also be achieved by selecting any source elements of the REC, right click on it "Capella Select &gt; Related REC Elements &gt; REC"

			<img border="0" src="Images/select_related_rec.png"/>
		</p>
		<p>On a diagram where the RPL is displayed, paste the layout:</p>
		<p>
			<img height="211" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_c008666.png"/>
		</p>
		<p>If multiple RPLs of the same REC are displayed, and you want to copy the REC layout to all RPLs, this can be achieved by pasting the layout on each RPL, one at a time.
			To do so, select a RPL element, right click "Capella Select &gt; Related RPL Elements &gt; RPL X" and paste the layout
			Do this for each RPL.</p>
		<p>
			<img border="0" src="Images/select_related_rpl.png"/>
		</p>
		<p>The layout is synchronized between the REC and the RPL:</p>
		<p>
			<img height="160" width="627" border="0" src="Images/8.2.%20Basic%20Use%20Case_html_m3dbcc481.png"/>
		</p>
	</body>
</html>